﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 战棋模拟器
{
    class 鱼人领军:Minion
    {
        public 鱼人领军():base()
        {
            buff = 2;
            Star = 2;
            Health = 3;
            Attack = 3;
            Race = race.murloc;
        }


        public override void Initialize()
        {
            foreach (Minion m in pool.places)
            {
                if (m == null)
                    break;
                if (m != this)
                    if (m.Race == race.murloc || m.Race == race.all)
                        m.Attack += buff;
            }
            base.Initialize();
        }


        public override void OnSpawn(Minion m)
        {
            if ((m.Race == race.murloc || m.Race == race.all) && m!=this)
                m.Attack += buff;
        }


        public override void Die()
        {
            foreach(Minion m in pool.places)
            {
                if (m == null)
                    break;
                if (m != this && (m.Race == race.murloc || m.Race == race.all))
                    m.Attack -= buff;
            }
            base.Die();
        }


        public override Minion NewOne()
        {
            return new 鱼人领军();
        }
    }


    class 鱼人领军_金色 : 鱼人领军
    {
        public 鱼人领军_金色() : base()
        {
            Attack *= 2;
            Health *= 2;
            count *= 2;
            buff *= 2;
        }

        public override Minion NewOne()
        {
            return new 鱼人领军_金色();
        }
    }
}
